<!DOCTYPE HTML>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Menangen | RU</title>

<style type="text/css">
HTML,BODY
		{
			background:#060F0E;
			font-family:Tahoma, Geneva, sans-serif;
            height:100%;
            margin:0;
            padding:0;
			color:#1F4E49
		}

.info {
			margin-left: auto;
			margin-right: auto;
			width: 100%; height: 700px;
			margin-top: -350px;
			top: 50%;
			position:absolute;
}

.russain_descr {
			text-shadow: 1px 1px 6px #000000;
			padding-left: 50px;
			padding-top: 10px;
}


.engl_descr {
			text-align:right;
			text-shadow: -1px -1px #000000;
			padding-right: 50px;
}

.contact {
			position:relative;
    		left:50%;
    		margin-left:-291px;
    		width:589px;
			margin-top:24px;
}



.logo {
			padding-left: 30px;
}

#map_canvas {
			height: 400px;
            text-align: center;
}


</style>

<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>

</head>

<script language="javascript">

try{
    var meHomeLatlng = new google.maps.LatLng(54.766135, 32.031462);
    var farmLatlng = new google.maps.LatLng(54.566937, 31.445467);
        if (Number($LO) > 0 & Number($LA) > 0) {
            var myLocation = new google.maps.LatLng($LO, $LA);
        }
        else {
            var myLocation = new google.maps.LatLng(54.766135, 32.031462);
        }
    var marker;
    var map;
}
catch (e) {
    error = "Извините, местоположение недоступно. Sorry, service of google latitude not worked now!";
}

	try{
        function initializeMap() {
        
        if (typeof(error) == 'undefined') {

              var mapOptions = {
                zoom: 10,
                mapTypeId: google.maps.MapTypeId.ROADMAP,
                center: myLocation,
                streetViewControl: false
              };

              map = new google.maps.Map(document.getElementById("map_canvas"),
                  mapOptions);
            // my home
            var homeImage = '../images/marker_home.png';
              marker = new google.maps.Marker({
                map:map,
                draggable:false,
                animation: google.maps.Animation.DROP,
                position: meHomeLatlng,
                icon: homeImage,
                title:"My home in town"
              });
             google.maps.event.addListener(marker, 'click', showHomeInfo);

            // my village
            var farmImage = '../images/marker_farm.png';
              farm_marker = new google.maps.Marker({
                map:map,
                draggable:false,
                position: farmLatlng,
                icon: farmImage,
                title:"House in village"
              });
                google.maps.event.addListener(farm_marker, 'click', showFarmInfo);

            // my position
            var menImage = '../images/marker_menangen.png';
            position_marker = new google.maps.Marker({
                map:map,
                draggable:false,
                animation: google.maps.Animation.DROP,
                position: myLocation,
                icon: menImage,
                title:"Me in realtime"
              });
                google.maps.event.addListener(position_marker, 'click', toggleBounce);

                // Farm
                var url = "http://www.panoramio.com/map/#lt%3D54.564498%26ln%3D31.454201%26z%3D6%26k%3D0%26a%3D1%26tab%3D1";
                var farmContentString = '<h3>Красный / Krasnyj</h3>Загородный дом <br /> House in village from 50 km of Smolensk' + '<br /><a target=_new href=' + url + '>Фотки Красного. Krasnyj on Panoramio</a>';

                var farmInfowindow = new google.maps.InfoWindow({
                    content: farmContentString
                });


                function showFarmInfo() {

                    farmInfowindow.open(map,farm_marker);

                }

                // my Home Smolensk
                var url = "http://www.panoramio.com/map/#lt%3D54.784058%26ln%3D32.106171%26z%3D7%26k%3D0%26a%3D1%26tab%3D1";
                var homeContentString = '<h3>Смоленск / Smolensk</h3><small>Мой дом в Смоленске. My home in Hero city Smolensk. Many trees, simple streets, and nice nature</small>' + '<br /><a target=_new href=' + url + '>Фото Смоленска. Smolensk on Panoramio</a>';


                var homeInfowindow = new google.maps.InfoWindow({
                    content: homeContentString
                });


                function showHomeInfo() {

                    homeInfowindow.open(map,marker);

                }

         }
        else {
            map_canvas.innerHTML = error;
        }
    }
    }
    catch (e) {
        alert('Error loading google map!');
    }
    try{
	    function toggleBounce() {

	  if (position_marker.getAnimation() != null) {
		position_marker.setAnimation(null);
	  } else {
		position_marker.setAnimation(google.maps.Animation.BOUNCE);
	  }
	}
    }
    catch (e) {
        alert('Error toogle');
    }
window.onload = initializeMap;
</script>

<body id="body">

<div style="height: 100%; position:relative">

    <div class="info">

            <div class="logo">
                <img src="../images/site_pattern.png" width="376" height="89" alt="menangen logo"/>
            </div>

            <div id="map_canvas">

            </div>



            <div class="russain_descr">
                            На этой карте ты можешь в реальном времени видеть моё текущее положение,<br />
                            а так же мой дом, места отдыха и мой город :)
            </div>

            <div class="engl_descr">
                            Now you can see me and my favorite places on the map (Google map).<br/>
                            My house, my village, my realtime position on map above.
            </div>

			<div class="contact">				
                <img src="../images/index_contact.png" width="589" height="95" align="my telephone"/>
			</div>
            

    </div>

</div>


</body>
</html>